package com.qfedu.yuxiaoer.service.impl;

import com.qfedu.yuxiaoer.dto.SourceresourcesDto;
import com.qfedu.yuxiaoer.entity.SourceOwner;
import com.qfedu.yuxiaoer.entity.SourceResources;
import com.qfedu.yuxiaoer.mapper.SourceMapper;
import com.qfedu.yuxiaoer.mapper.SourceOwnerMapper;
import com.qfedu.yuxiaoer.mapper.SourceResourcesMapper;
import com.qfedu.yuxiaoer.service.SourceresourcesService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SourceresourcesServiceImpl implements SourceresourcesService {
    @Autowired
    private SourceResourcesMapper sourceResourcesMapper;

    @Override
    public int sourceresources(SourceresourcesDto sourceresourcesDto) {
        SourceResources sourceResources = new SourceResources();
        BeanUtils.copyProperties(sourceresourcesDto,sourceResources);

        return sourceResourcesMapper.insertSelective(sourceResources);

    }
}
